#make plots for f3
java_index_javanese = rdd_plot_binned_f3(df = data_3, var = java_index_skd_bw_10, bw = 50, label = "Javanese Prefentialism Index (SDs)")
java_index_nonjavanese = rdd_plot_binned_f3(df = data_3, var = non_java_index_skd_bw_10, bw = 50, label = "Javanese Prefentialism Index (SDs)")
regional_index = rdd_plot_binned_f3(df = data_3, var = regional_index_skd_bw_10, bw = 50, label = "Regional Prefentialism Index (SDs)")
religious_index = rdd_plot_binned_f3(df = data_3, var = religious_index_skd_bw_10, bw = 50, label = "Religious Intolerance Index (SDs)")
national_index = rdd_plot_binned_f3(df = data_3, var = national_index_skd_bw_10, bw = 50, label = "National Identification Index (SDs)")
corruption_index = rdd_plot_binned_f3(df = data_3, var = corruption_index_skd_bw_10, bw = 50, label = "Corruption Perception Index (SDs)")

#save plots
ggsave(filename = "./_4_outputs/figures/figure_a5a.png", plot = java_index_javanese, width = 6, height = 4)
ggsave(filename = "./_4_outputs/figures/figure_a5b.png", plot = java_index_nonjavanese, width = 6, height = 4)
ggsave(filename = "./_4_outputs/figures/figure_a5c.png", plot = regional_index, width = 6, height = 4)
ggsave(filename = "./_4_outputs/figures/figure_a5d.png", plot = religious_index, width = 6, height = 4)
ggsave(filename = "./_4_outputs/figures/figure_a5e.png", plot = national_index, width = 6, height = 4)
ggsave(filename = "./_4_outputs/figures/figure_a5f.png", plot = corruption_index, width = 6, height = 4)
